package org.gcb.core.sandbox;

/**
 *
 * @author Jason
 */
public class SlotModelEvent extends java.util.EventObject{
    public static final int SWAP = 0;
    public static final int EQUIP = 1;
    public static final int UN_EQUIP = -1;

    protected int type;

    public SlotModelEvent(SlotModel<?> source) {
	this(source, SWAP);
    }

    public SlotModelEvent(SlotModel<?> source, int type) {
	super(source);
    }

    public int getType() { return type; }

    @Override
    public String toString() {
	StringBuilder sb = new StringBuilder(getClass().getName());
	sb.append("type:").append(type).append(',');
	sb.append("source:").append(this.getSource()).append(',');
	return sb.toString();
    }
}